﻿<?xml version="1.0" encoding="utf-8"?>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ page  contentType="text/html; charset=UTF-8" %> 

  <%@include file="loading.jsp" %>	
  	<div id="divsumir" name="divsumir">
 	<s:actionerror cssClass="ui-state-error ui-corner-all" cssStyle="padding: 0pt 0.7em;"/>  	 
  	<s:actionmessage cssClass="ui-state-highlight ui-corner-all" cssStyle="padding: 0pt 0.7em; margin-top: 20px;"/>
		
  
  	<fieldset class="ui-widget ui-widget-content ui-corner-all" style="margin: 10px">
  	
	<legend class="ui-state-default ui-corner-all">&nbsp;&nbsp;&nbsp;Usuários&nbsp;&nbsp;&nbsp;</legend>
  	 		<br>
  	 <sj:div effect="slide" effectDuration="600">			
     <table style="align: left;  width: 100%" >    
     	<thead align="right">
     	<td colspan="6">
     		<table style="align: right;">
  		<tr>
  			<!-- <td>
  				<label style="font-size: 1"> Exibindo Registros de <s:property value="pageatual*pagesize"/> a <s:property value="(pageatual+1)*pagesize"/></label>
  			</td>-->
  			<td>
  				<s:url id="urlNewUser" action="editarusuario!loadUser"/>
				<sj:a onclick="divSumir();" href="%{urlNewUser}" onclick="divSumir();"  targets="main" indicator="indicator"><span class="ui-icon ui-icon-newwin" title="Adicionar Usuário."/></sj:a>
  			</td>
  		
  			<s:if test="%{pageatual!=0}">
  			<td>
  			
  				<s:url id="urlPriorPage" action="listarusuarios!priorPage">				
				<s:param name="pageatual"><s:property value="pageatual"/>
				</s:param>				
			</s:url>
			<sj:a href="%{urlPriorPage}" targets="main" indicator="gridIndicator"><span class="ui-icon ui-icon-seek-prev"/></sj:a>
  			</td>
  			</s:if>
  			
  			<td>  			
  			<s:url id="urlNextPage" action="listarusuarios!nextPage">				
				<s:param name="pageatual"><s:property value="pageatual"/>
				</s:param>				
			</s:url>
			<sj:a href="%{urlNextPage}"  targets="main" indicator="gridIndicator"><span class="ui-icon ui-icon-seek-next"/></sj:a>
  			</td>
  			
  			<td>
  				<img src="images/indicator2.gif" id="gridIndicator" alt="Recarregando Usuários" style="display: none"/>
  			</td>
  		</tr>
  	</table>
  		</td>
     	</thead>
     	<tr>  
     		<td>
     			
     		</td>   		
     		<td>
     			<label>Nome</label>
     		</td>
     		<td>
     			<label>Login</label>
     		</td>
     		<td>
     			<label>Perfil</label>
     		</td>
     		<td>
     			<label>Ultimo Acesso</label>
     		</td>
     		<td>
     		</td>
     	
     	</tr>
     		<s:set value="lista" name="listagem" />	
     		<s:iterator value="listagem">
     			<tr>
     				<td align="center">
     					<span class="ui-icon ui-icon-note" title="<s:property value="telefones+' '+email"/>"/>
     				</td>     				
     				<td>
     					<s:property value="nome"/>
     				</td>
     				<td>
     					<s:property value="Login"/>
     				</td>
     				<td>
     					<s:property value="descricaoPerfil"/>
     				</td>
     				<td>
     					<s:property value="lastLogin"/>
     				</td>
     				<td align="center">
  							<s:url id="url+user.login" action="editarusuario!loadUser">				
								<s:param name="login"><s:property value="Login"/>
								</s:param>				
							</s:url>
							<sj:a onclick="divSumir();" onclick="divSumir();" href="%{url+user.login}"  targets="main" indicator="indicator"><table><tr title="Editar e excluir usuário"><td><span class="ui-icon ui-icon-pencil"/></td><td><span class="ui-icon ui-icon-trash"/></td></tr></table></sj:a>
     				</td>
     				
     			</tr>
     		</s:iterator>  			
  		</table>
		</sj:div>
	</fieldset>	
	<div>
	
 
